import { instance } from "../utils/request";
const getBusinesssPagination = async (page:number,limit:number,key?:string) => {
	return await instance.get("/Businesss/Pagination", {page,limit,key});
};

const addBusinesss = async (data:RequestCreateBusinesssDto) => {
	return await instance.post("/Businesss/Add", data);
};

const updateBusinesss = async (data:RequestUpdateBusinesssDto) => {
	return await instance.post("/Businesss/Update", data);
};

const getBusinesssDetail = async (id:number) => {
	return await instance.get("/Businesss/Detail", { id  });
};

const deleteBusinesss = async (data:RequestIdBusinesssDto) => {
	return await instance.post("/Businesss/Delete", data);
};

const BusinesssApi = {
	getBusinesssPagination,
	addBusinesss,
	updateBusinesss,
	getBusinesssDetail,
	deleteBusinesss,
};

export default BusinesssApi
